﻿<UserControl x:Class="BTM_Client_Application.DeviceInfoControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
             mc:Ignorable="d" 
             d:DesignHeight="330.125" d:DesignWidth="442" MaxHeight="600" Height="auto" MaxWidth="1000" Width="auto" Background="Transparent">

    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Colours.xaml" />
                <ResourceDictionary Source="pack://application:,,,/Styles/ToolTip.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>

    <Border Background="Wheat" BorderThickness="2" CornerRadius="7" Padding="4">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="60"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Grid Grid.Row="0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="20"/>
                    <RowDefinition Height="30"/>
                    <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
                <Border Padding="4,0,4,0" CornerRadius="5" Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="2" HorizontalAlignment="Center" Background="#CF181818">
                    <TextBlock Foreground="White" FontWeight="SemiBold" FontSize="13" Grid.Row="0" Name="DeviceNameBox" HorizontalAlignment="Center" TextWrapping="Wrap" Text="Device" VerticalAlignment="Center" Grid.ColumnSpan="2" Grid.Column="1"/>
                </Border>
                <Label Name="StationLabel" FontWeight="DemiBold" Content="StationLabel" HorizontalAlignment="Right" Grid.Row="1" Grid.Column="0" Margin="0,0,1,0" VerticalAlignment="Center"/>
                <Label Name="StationBox" Content="StationBox" HorizontalAlignment="Left" Grid.Row="1" Grid.Column="1" Margin="0,0,0,0" VerticalAlignment="Center"/>
                <Label Name="DeviceLabel" FontWeight="DemiBold"  Grid.Column="2" HorizontalAlignment="Right" Margin="0,0,1,0" Grid.Row="1" Content="DeviceLabel" VerticalAlignment="Center"/>
                <Label Name="DeviceBox" Grid.Column="3" HorizontalAlignment="Left" Margin="0,0,0,0" Grid.Row="1" Content="DeviceBox" VerticalAlignment="Center"/>

            </Grid>
            <TextBox Name="AdditionalInfoBox" controls:TextboxHelper.Watermark="Additional info" Grid.Row="1" MaxWidth="1000" TextWrapping="Wrap" AcceptsReturn="True" Margin="0,0,0,4" TextChanged="AdditionalInfoBox_OnTextChanged"/>
            <DataGrid Name="DataList" HorizontalAlignment="Stretch" Grid.Row="2" VerticalAlignment="Stretch" IsReadOnly="True" 
                      SelectionUnit="FullRow" AutoGenerateColumns="False" Background="White">
                <DataGrid.RowStyle>
                    <Style TargetType="DataGridRow">
                        <Setter Property="Background" Value="{Binding ItemBackground}"/>
                    </Style>
                </DataGrid.RowStyle>
            </DataGrid>
                
        </Grid>
    </Border>
</UserControl>
